package com.hncc.kumao.entity;

import java.util.Date;

import com.alibaba.fastjson.JSONObject;

/**
 * 实体类
 * @author Administrator *
 */
public class BreakpointUploadTask {	
	private String id;//断点上传任务编号
	private String userId;//创建上传任务的用户id
	//private String targetNetdiskAccessTokenId;//目标网盘访问令牌编号
	private NetdiskAccessToken netdiskAccessToken;//目标网盘对象
	private String fileSize;//文件大小，单位为 B
	private String fileMd5;//文件MD5
	private JSONObject fileInfo;//文件其他信息，以json格式存储
    private String fileInfoString;//文件其他信息，以json格式存储(json字符串)
	private Integer totalFragmentNumber;//文件总分片数量
	private String fileUri;//要上传的文件在网盘中保存的路径，路径从根路径开始，包含文件名
	private String fileServerPath;//服务器接收的文件在服务器中保存的绝对路径，包括文件名
	private Integer state;//任务状态 0 表示新建任务，正在等待接收文件、 1 表示正在接收文件、 2 表示暂停接收文件、 3 表示接收文件完成、 4 表示接收文件失败、 5 表示正在向网盘上传文件、 6 表示向网盘上传文件完成、 7 表示向网盘上传文件失败、 8 表示取消断点上传任务、 9 表示任务已删除。
	private Date createTime;//任务创建时间
	private Date startGetTime;//接收文件开始时间
	private Date endGetTime;//接收文件结束或接收文件失败时间
	private Date startUploadTime;//向网盘上传文件开始时间
	private Date endUploadTime;//向网盘上传文件结束时间
	
    public String getId() {
        return id;
    }
    public String getUserId() {
        return userId;
    }
    /*public String getTargetNetdiskAccessTokenId() {
        return targetNetdiskAccessTokenId;
    }*/
    public String getFileSize() {
        return fileSize;
    }
    public String getFileMd5() {
        return fileMd5;
    }
    public JSONObject getFileInfo() {
        return fileInfo;
    }
    public String getFileInfoString() {
        return fileInfoString;
    }
    public Integer getTotalFragmentNumber() {
        return totalFragmentNumber;
    }
    public String getFileUri() {
        return fileUri;
    }
    public String getFileServerPath() {
        return fileServerPath;
    }
    public Integer getState() {
        return state;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public Date getStartGetTime() {
        return startGetTime;
    }
    public Date getEndGetTime() {
        return endGetTime;
    }
    public Date getStartUploadTime() {
        return startUploadTime;
    }
    public Date getEndUploadTime() {
        return endUploadTime;
    }
    public void setId(String id) {
        this.id = id;
    }
    public void setUserId(String userId) {
        this.userId = userId;
    }
    /*public void setTargetNetdiskAccessTokenId(String targetNetdiskAccessTokenId) {
        this.targetNetdiskAccessTokenId = targetNetdiskAccessTokenId;
    }*/
    public void setFileSize(String fileSize) {
        this.fileSize = fileSize;
    }
    public void setFileMd5(String fileMd5) {
        this.fileMd5 = fileMd5;
    }
    public void setFileInfo(JSONObject fileInfo) {
        this.fileInfo = fileInfo;
    }
    public void setFileInfoString(String fileInfoString) {
        this.fileInfoString = fileInfoString;
    }
    public void setTotalFragmentNumber(Integer totalFragmentNumber) {
        this.totalFragmentNumber = totalFragmentNumber;
    }
    public void setFileUri(String fileUri) {
        this.fileUri = fileUri;
    }
    public void setFileServerPath(String fileServerPath) {
        this.fileServerPath = fileServerPath;
    }
    public void setState(Integer state) {
        this.state = state;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
    public void setStartGetTime(Date startGetTime) {
        this.startGetTime = startGetTime;
    }
    public void setEndGetTime(Date endGetTime) {
        this.endGetTime = endGetTime;
    }
    public void setStartUploadTime(Date startUploadTime) {
        this.startUploadTime = startUploadTime;
    }
    public void setEndUploadTime(Date endUploadTime) {
        this.endUploadTime = endUploadTime;
    }
    public NetdiskAccessToken getNetdiskAccessToken() {
        return netdiskAccessToken;
    }
    public void setNetdiskAccessToken(NetdiskAccessToken netdiskAccessToken) {
        this.netdiskAccessToken = netdiskAccessToken;
    }
    @Override
    public String toString() {
        return "BreakpointUploadTask [id=" + id + ", userId=" + userId + ", netdiskAccessToken=" + netdiskAccessToken
                + ", fileSize=" + fileSize + ", fileMd5=" + fileMd5 + ", fileInfo=" + fileInfo + ", fileInfoString="
                + fileInfoString + ", totalFragmentNumber=" + totalFragmentNumber + ", fileUri=" + fileUri
                + ", fileServerPath=" + fileServerPath + ", state=" + state + ", createTime=" + createTime
                + ", startGetTime=" + startGetTime + ", endGetTime=" + endGetTime + ", startUploadTime="
                + startUploadTime + ", endUploadTime=" + endUploadTime + "]";
    }
}
